package com.hhh.Service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hhh.Mapper.LoginMapper;
import com.hhh.Pojo.Employee;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class LoginService implements com.hhh.Service.LoginService {

    @Autowired
    LoginMapper loginMapper;

    @Override
    public Employee Login(Employee employee) {
//      根据用户名查找信息，用户名是唯一标识
        QueryWrapper<Employee> wrapper = new QueryWrapper<>();
        wrapper.eq("username", employee.getUsername());
        return loginMapper.selectOne(wrapper);
    }
}
